using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Login
{
    /// <summary>
    /// generate by msg tool
    /// 玩家退出消息
    /// </summary>
	public class ResLogoutMsg : ResMessage
	{
		//0:正常退出,1:同一个账号重复登录被T号退出,2:玩家被冻结退出,3:游戏服务器维护被T下线
		public int type;

        public ResLogoutMsg() { }

        public ResLogoutMsg(int type)
        {
            this.type = type;
        }

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushInt(type);
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			type = b.toInt32();
			
		}

		public int Id
		{
            get { return 100202; }
		}

        public String Desc
        {
            get { return "玩家退出消息"; }
        }
	}
}